package com.clkj.nangang.mvp.personcenter.personinfo;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import com.clkj.nangang.R;
import com.clkj.nangang.common.Constant;
import com.clkj.nangang.mvp.base.BaseActivity;
import com.clkj.nangang.util.CommonUtil;

public class PersonInfoActivity extends BaseActivity {


    private ImageView ivBack;
    private ImageButton ibSubmit;
    private EditText etName;
    private EditText etPhone;
    private TextView tvAddressType;
    private EditText etSquare;
    private EditText etRoad;
    private EditText etRoom;
    private TextView tvResetPass;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_person_info);
        initView();
        initData();
        assignView();
    }

    @Override
    public void initData() {


    }

    @Override
    public void assignView() {
        //退出
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        etName.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_NAME, ""));
        etPhone.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_PHONE, ""));
        tvAddressType.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_CZXQ, ""));
        etSquare.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_QUANTERS, ""));
        etRoad.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_FLOOR, ""));
        etRoom.setText((CharSequence) CommonUtil.getShareValue(Constant.NANGAN_ROOM, ""));
    }

    @Override
    public void initView() {

        ivBack = (ImageView) findViewById(R.id.iv_back);
        ibSubmit = (ImageButton) findViewById(R.id.ib_submit);
        etName = (EditText) findViewById(R.id.et_name);
        etPhone = (EditText) findViewById(R.id.et_phone);
        tvAddressType = (TextView) findViewById(R.id.tv_addressType);
        etSquare = (EditText) findViewById(R.id.et_square);
        etRoad = (EditText) findViewById(R.id.et_road);
        etRoom = (EditText) findViewById(R.id.et_room);
        tvResetPass = (TextView) findViewById(R.id.tv_reset_pass);
    }
}
